#!/bin/bash
# BashChat by BiteTheByte [bitethebyte (at) gmail (dot) com]
# Licensed under GPLv3
# This program is written in bash scripting and comes with absolutely NO WARRANTY
# Be carefull and use it with caution and wisdom.
# :) Enjoy ssh chatting!!!

#$1 posting path $2 text to post $3 escape sequence (I hope the shell won't crash)

#Check for enough parameters
if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ];
then
	echo "Error: Bad Parameters"
else
	#Check for existing pipe
	if [ -e "$1" ];
	then
		echo "$2" >> "$1"
	else
		echo "Error: Pipe not found"
	fi
fi
